package com.scy.boot04test05.mapper;

import com.scy.boot04test05.entity.House;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface HouseMapper {

    @Insert("insert into house values(null,#{address},#{storey},#{housePrices},#{area},#{price})")
    void insert(House house);

    @Select("select * from house")
    List<House> select();

    @Delete("delete from house where id=#{id} ")
    void delete(int id);

    @Update("update house set address=#{address},storey=#{storey},housePrices=#{housePrices},area=#{area} where id=#{id}")
    void update(House house);
}
